package a.f.h.d;

import a.c.e;
import a.c.k;
import a.c.x;
import a.c.z;
import a.f.kc;
import a.f.oc;
import a.i.db;

public class t
{
  private h a = null;
  private x c = null;
  public static int d;
  
  public void a(a.f.o paramo, int paramInt)
  {
    int j = j.r;
    boolean bool = j.q;
    this.a = new h(paramo, paramInt);
    k localk = paramo.c(oc.b);
    this.c = db.a();
    if (localk != null)
    {
      a.c.w localw = paramo.v();
      label180:
      do
      {
        e locale;
        a.d.t localt1;
        a.d.t localt2;
        do
        {
          if (!localw.e()) {
            break;
          }
          locale = localw.d();
          localt1 = paramo.v(locale);
          kc[] arrayOfkc = (kc[])localk.get(localw.d());
          if (((j != 0) || (arrayOfkc != null)) && ((j != 0) || (arrayOfkc.length > 0)))
          {
            int i = 0;
            do
            {
              if (i >= arrayOfkc.length) {
                break label180;
              }
              kc localkc = arrayOfkc[i];
              a.d.t localt3 = a(localkc.a().a(), paramo.o(locale));
              localt1 = a(localt1, localt3);
              i++;
              if ((j == 0) && (bool)) {
                break;
              }
            } while (!bool);
          }
          localt2 = paramo.v(locale);
        } while (j != 0);
        if (j == 0)
        {
          if (!localt2.equals(localt1))
          {
            double d1 = localt2.e() - localt1.e();
            double d2 = localt1.e() + localt1.c() - localt2.e() - localt2.c();
            double d3 = localt2.d() - localt1.d();
            double d4 = localt1.d() + localt1.b() - localt2.d() - localt2.b();
            h.a_ locala_ = this.a.a(locale, d1, d2, d3, d4);
            this.c.a(locale, locala_);
          }
          localw.f();
        }
      } while (!bool);
    }
  }
  
  public z a(a.f.o paramo, e parame)
  {
    int j = j.r;
    boolean bool = j.q;
    z localz = new z();
    k localk = paramo.c(oc.b);
    a.d.t localt1 = paramo.v(parame);
    Object localObject = (j != 0) || (this.c != null) ? (h.a_)this.c.get(parame) : null;
    if (j == 0)
    {
      if (localk != null)
      {
        if (j != 0) {
          break label104;
        }
        if (localObject != null) {}
      }
      else
      {
        localz.add(localt1);
      }
    }
    else if ((j == 0) && (!bool)) {
      return localz;
    }
    label104:
    double d1 = localObject.a();
    double d2 = localObject.b();
    double d3 = localObject.c();
    double d4 = localObject.d();
    a.d.t localt2 = new a.d.t(localt1.d() + d3, localt1.e() + d1, localt1.b() - d3 - d4, localt1.c() - d1 - d2);
    localz.add(localt2);
    kc[] arrayOfkc = (kc[])localk.get(parame);
    if (((j != 0) || (arrayOfkc != null)) && ((j != 0) || (arrayOfkc.length > 0)))
    {
      int i = 0;
      do
      {
        if (i >= arrayOfkc.length) {
          break;
        }
        kc localkc = arrayOfkc[i];
        a.d.t localt3 = a(localkc.a().a(), a(localt2));
        if (j == 0)
        {
          if (bool) {
            break label286;
          }
          localz.add(localt3);
          i++;
        }
      } while (!bool);
    }
    label286:
    return localz;
  }
  
  private a.d.w a(a.d.t paramt)
  {
    return new a.d.w(paramt.d() + paramt.b() * 0.5D, paramt.e() + paramt.c() * 0.5D);
  }
  
  private a.d.t a(a.d.t paramt, a.d.w paramw)
  {
    return new a.d.t(paramw.a + paramt.d, paramw.b + paramt.e, paramt.b(), paramt.c());
  }
  
  public void a()
  {
    if (j.r == 0) {
      if (this.a != null) {
        this.a.c();
      }
    }
    this.a = null;
  }
  
  private a.d.t a(a.d.t paramt1, a.d.t paramt2)
  {
    double d1 = Math.min(paramt1.d(), paramt2.d());
    double d2 = Math.max(paramt1.d() + paramt1.b(), paramt2.d() + paramt2.b());
    double d3 = Math.min(paramt1.e(), paramt2.e());
    double d4 = Math.max(paramt1.e() + paramt1.c(), paramt2.e() + paramt2.c());
    return new a.d.t(d1, d3, d2 - d1, d4 - d3);
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.h.d.t
 * JD-Core Version:    0.7.0.1
 */